import java.util.*;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
public class primeNumbers {
    void result(List<Future<List<Boolean>>> list) throws ExecutionException, InterruptedException {
        for (Future<List<Boolean>> future : list) {
             List<Boolean> resultList  = future.get();
             for(int i=0;i<resultList.size();i++){
                 if(resultList.get(i))
            System.out.println(i);  }
        }
   }

}
